<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
I've been very happy to be able to start migrating from Incanica's ITP<br>
to Watir at work, but I've run into my first real problem. I have a<br>
select box defined thus:<br>
<br>
<select class="body" name="op_numhits">
<option value="0">=</option>
<option value="1">&lt;&gt;</option>
<option value="3">&gt;=</option>
<option value="5">&lt;=</option>
</select>
<br>
and I'm trying to choose the "&gt;=" option via the following code:<br>
<pre>  $ie.selectBox( :name, "op_numhits" ).select( "&gt;=" )</pre>
(Aside: actually, what I write to define the task is XML adapted from
ITP's syntax, e.g.,<br>
<pre>  &lt;browser_action entity="selectBox" entity_id_type="name" entity_id_value="op_numhits" action="select" param="&amp;gt;=" /&gt;      </pre>
and our WebSiteTester Ruby class translates that into
Watir calls.)<br>
<br>
and the output I get from Watir is:<br>
<br>
Setting box op_numhits to &gt;= String<br>
comparing &gt;= to &aacute;=&aacute;&aacute;<br>
comparing &gt;= to &aacute;&lt;&gt;&aacute;<br>
comparing &gt;= to &aacute;&gt;=&aacute;<br>
comparing &gt;= to &aacute;&lt;=&aacute;<br>
<br>
<br>
While I just realized I could enhance our WebSiteTester class to be
able to pass Regexp's as well as Strings to the select() method, it
would also be nice to be able to specify the desired select option by
value (in my example, the value is "3").<br>
<hr><br>
Is it even possible for Watir to select something based on an attribute<br>
that's empty, like the first option of the select box below? I know I<br>
also have an issue given that I'm translating from an XML representation<br>
to a Ruby Watir call, and I'm probably getting a nil back from REXML<br>
when I ask for the value of an attribute that has nothing between the<br>
quotes....<br>
<br>
<select class="body" name="s_interest" id="s_interest">
<option value="" selected="Y"></option>
<option value="-1">Yes</option>
<option value="0">No</option>
</select>
<br>
<br>
</body>
</html>
